<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<script language="javascript">
  function onstsubmit()
	{
		$('#expressform').modal('hide');	
		$('#attributeform').submit();
	}
  //云途 燕文
  function emsexpress(type)
  {
      var str = selectallpro();
      //验证是否已经分仓，若未分仓，则不允许操作
        $.post("/orderlist/ajaxbutton", {"op": "doSeparateWarehouse","str":str},
              function(data){
                  if(data.code==200)
                  {
                      var url ="/deliverorder/ajaxbutton?op=saveexpress";
                      $("#yanwenattributeform").attr("action",url);
                      if(str !=false){
                          $("#yanwenorderlistst").val(str);
                          $("#yanwentype").val(type);
                          //$("#logistics").empty();
                          $("#deliver").empty();
                          //只针对E邮包
                          $("#account_tr").hide();
                          $("#logistics_tr").hide();
                          if(type=="YT"){
                              //显示文字
                              $("#order_mailno").text('');
                              $("#order_mailno").text('云途待交运订单编号');
                              //物流方式 logistics
                              //$("#logistics").append("<option value='云途中欧专线平邮'>云途中欧专线平邮</option>");
                              //$("#logistics").append("<option value='云途德国专线挂号'>云途德国专线挂号</option>");
                              //$("#logistics").append("<option value='云途法国专线挂号'>云途法国专线挂号</option>");
                              // $("#logistics").append("<option value='云途英国专线标准'>云途英国专线标准</option>");
                              //发货方式
                              $("#deliver").append("<option value='云途德国专线平邮'>云途德国专线平邮</option>");
                              $("#deliver").append("<option value='云途中欧专线平邮'>云途中欧专线平邮</option>");
                              $("#deliver").append("<option value='云途中欧专线挂号'>云途中欧专线挂号</option>");
                              $("#deliver").append("<option value='中美专线(特惠)'>中美专线(特惠)</option>");
                              $("#deliver").append("<option value='云途德国专线挂号'>云途德国专线挂号</option>");
                              $("#deliver").append("<option value='云途法国专线挂号'>云途法国专线挂号</option>");
                              $("#deliver").append("<option value='云途英国专线标准'>云途英国专线标准</option>");
                          }
                          if(type=="CNPOST"){
                              //显示文字
                              $("#order_mailno").text('');
                              $("#order_mailno").text('E邮宝线上待交运订单编号');
                              //发货方式
                              $("#deliver").append("<option value='EPACK'>EPACK</option>");
                          }
                          if(type=="YW"){
                              //显示文字
                              $("#order_mailno").text("");
                              $("#order_mailno").text("燕文待交运订单编号");
                              //物流方式 logistics
                              //$("#logistics").append("<option value='中邮上海平邮小包'>中邮上海平邮小包</option>");
                              //$("#logistics").append("<option value='中邮小包挂'>中邮小包挂</option>");
                              //发货方式
                              //$("#deliver").append("<option value='燕文美国专线'>燕文美国专线</option>");
                              $("#deliver").append("<option value='中邮上海挂号小包'>中邮上海挂号小包</option>");
                              $("#deliver").append("<option value='中邮上海平邮小包'>中邮上海平邮小包</option>");
                              $("#deliver").append("<option value='新加坡邮政挂号小包'>新加坡邮政挂号小包</option>");
                          }
	                      //欧速通
	                      if(type=="OST"){
		                      //显示文字
		                      $("#order_mailno").text("");
		                      $("#order_mailno").text("欧速通待交运订单编号");
		                      //发货方式
		                      $("#deliver").append("<option value='英伦速邮（普货）'>英伦速邮（普货）</option>");
		                      $("#deliver").append("<option value='英伦速邮全追踪（普货）'>英伦速邮全追踪（普货）</option>");
	                      }
                          //E邮宝
                          if(type=="EMS"){
                              //只针对E邮包
                              $("#account_tr").show();
                              $("#logistics_tr").show();
                              //显示文字
                              $("#order_mailno").text("");
                              $("#order_mailno").text("E邮宝线下苏州待交运订单编号");
                              //$("#order_mailno").text("E邮宝线下上海待交运订单编号");
                              //物流方式 logistics
                              $("#logistics").empty();
                              $("#logistics").append("<option value='苏州 E邮宝线下'>苏州 E邮宝线下</option>");
                              $("#logistics").append("<option value='E邮宝线下上海'>E邮宝线下上海</option>");
                              $("#logistics").append("<option value='E邮宝'>E邮宝</option>");
                              //物流方式 account
                              $("#account").empty();
                              $("#account").append("<option value='苏州E邮宝'>苏州E邮宝</option>");
                              $("#account").append("<option value='E邮宝线下上海'>E邮宝线下上海</option>");
                              //$("#account").append("<option value='CNPOST'>CNPOST</option>");
                              //发货方式
                              $("#deliver").empty();
                              $("#deliver").append("<option value='E邮宝'>E邮宝</option>");
                              $("#deliver").append("<option value='E包裹'>E包裹</option>");
                              $("#deliver").append("<option value='E特快'>E特快</option>");
                              //$("#deliver").append("<option value='EPACK'>EPACK</option>");
                          }

                          $('#yanwenexpressform').modal('show');
                      }
                  }else{
                       alert(data.msg);return false;
                  }
              },"json");
      //alert(warehouse);return false;

  }
  function onyanwensubmit()
  {
      $('#yanwenexpressform').modal('hide');
      $('#yanwenattributeform').submit();
  }
  //E邮宝相关参数进行调整
  function changeLogistics() {
      var logistics = $("#logistics").val();
      $("#account").empty();
      $("#deliver").empty();
      if(logistics=="E邮宝线下上海"){
          $("#account").append("<option value='E邮宝线下上海'>E邮宝线下上海</option>");
          $("#account").append("<option value='苏州E邮宝'>苏州E邮宝</option>");
          //发货方式
          $("#deliver").append("<option value='E邮宝'>E邮宝</option>");
          $("#deliver").append("<option value='E包裹'>E包裹</option>");
          $("#deliver").append("<option value='E特快'>E特快</option>");
      }
      if(logistics=="苏州 E邮宝线下"){
          $("#account").append("<option value='苏州E邮宝'>苏州E邮宝</option>");
          $("#account").append("<option value='E邮宝线下上海'>E邮宝线下上海</option>");
          //发货方式
          $("#deliver").append("<option value='E邮宝'>E邮宝</option>");
          $("#deliver").append("<option value='E包裹'>E包裹</option>");
          $("#deliver").append("<option value='E特快'>E特快</option>");
      }
      if(logistics=="E邮宝"){
          $("#account").append("<option value='CNPOST'>CNPOST</option>");
          //发货方式
          $("#deliver").append("<option value='EPACK'>EPACK</option>");
      }
  }

//打印相关标签
  function printLabel()
  {
      var vote_arr = document.getElementsByName("ppid[]");
      var idarr = new Array();
      var i=0;
      var str="";
      for(var j = 0; j < vote_arr.length; j++)
      {
          if(vote_arr[j].checked == true)
          {
              idarr[i] = vote_arr[j].value;
              str += vote_arr[j].value+",";
              i++;
          }

      }
      if(i<=0){
          alert("未选中数据");
          return false;
      }else{
          //return str;
      }
      $.post("/orderlist/ajaxbutton", {"op": "printLabel","str":str},
              function(data){
                  if(data.txt==200)
                  {
                     //alert(data.url);return ;
                      //var url = "/order/ajaxbutton?op=sfexpressurl&orderType="+7+"&id="+str;
                       //window.location.href = data.url;
                      window.open(data.url);
                  }else{
                     alert(data.msg);return ;
                  }
                  return;
              },"json");
      //moreopenMailNoUrl(1,7);


  }
  function batchSearch() {
      var vote_arr = document.getElementsByName("ppid[]");
      var idarr = new Array();
      var i=0;
      var str="";
      for(var j = 0; j < vote_arr.length; j++){
          if(vote_arr[j].checked == true){
              idarr[i] = vote_arr[j].value;
              str += vote_arr[j].value+"\n";
              i++;
          }
      }
      if(str !=false)
      {
        $("#batchsearch").text(str);
      }

      $('#batchsearchexpressform').modal('show');
  }
  function showShopNames() {
      var platformId = $("#platformId").val();
      if(platformId){
          $.post("/orderexcel/ajaxbutton", {"op": "getShopNames","platformId":platformId},
                  function(data){
                      $("#shopId").empty();
                      $("#shopId").append("<option value=''>-请选择店铺-</option>");
                      for(var i=0;i<data.length;i++){
                          $("#shopId").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>");
                      }
                  },"json");
      }else{
          $("#shopId").empty();
          $("#shopId").append("<option value=''>-请选择店铺-</option>");
      }

  } 
  function outOrderExcel() {
      if(confirm("你确认导出吗?")){
          $("#outexcel").val(1);
          $("#search").submit();
          $("#outexcel").val(0);
      }
  }
 function submitOrderBatch(flagtype) {
     $('#flagtype').val(flagtype);
     $("#batchsearchattributeform").submit();
     $('#batchsearchexpressform').modal('hide');
 }
</script>
<title>订单列表</title>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/orderleft.tpl'}}
<div class="centercontent">
<div class="pageheader notab">
  <h1 class="pagetitle">订单列表</h1>
  <span class="pagedesc"></span>
  <div class="menulist">
    <ul class="profile_summary">
       <li {{if $status=="" && $current ==''}} class="current"{{/if}}> <a href="/orderlist/orderlist"><span>所有订单</span></a></li>
       <li {{if $current==1}} class="current"{{/if}}> <a href="/orderlist/orderlist?ty=2&starttime={{$today}}&endtime={{$today}}&current=1"><span>今日订单</span></a></li>
       <li {{if $status==1}} class="current"{{/if}}> <a href="/orderlist/orderlist?status=1"><span>新订单</span></a></li>
       <li {{if $status==2}} class="current"{{/if}}> <a href="/orderlist/orderlist?status=2"><span>已支付</span></a></li>
       <li {{if $status==3}} class="current"{{/if}}> <a href="/orderlist/orderlist?status=3"><span>配货中</span></a></li>
       <li {{if $status==4}} class="current"{{/if}}> <a href="/orderlist/orderlist?status=4"><span>已发货</span></a></li>
       <li {{if $status==5}} class="current"{{/if}}> <a href="/orderlist/orderlist?status=5"><span>已完成</span></a></li>
       <li {{if $status==6}} class="current"{{/if}}> <a href="/orderlist/orderlist?status=6"><span>作废</span></a></li>
        </ul>
  </div>
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
   <!--搜索栏-->
          <div>
          <div style="float:left">
          <div style="padding:3px">
         <ul class="buttonlist">
                   		<li><a href="/orderlist/addorder" class="stdbtn">创建订单</a></li>
                        <li><button class="stdbtn btn_black" onClick="OrderIn()">导入订单</button></li>
                   		<li><button class="stdbtn btn_yellow" onClick="changorderstatusPro('order_status',2)">标收款</button></li>
                        <li><button class="stdbtn btn_blue" onClick="changorderstatusPro('order_status',3)">标配货</button></li>
                        <li><button class="stdbtn btn_black" onClick="batchExpress()">批量发货</button></li>
                        
                        {{if $managers || in_array('216',$showpower)}}
                        <li><button class="stdbtn btn_yellow" onClick="changorderstatusPro('order_status',4)">标发货</button></li>
                        {{/if}}
                        
                        <li><button class="stdbtn btn_lime" onClick="changorderstatusPro('order_status',5)">标完成</button></li>
                       <!-- <li><button class="stdbtn btn_orange">打印中心</button></li>-->
                        <li><button onClick="printLabel()" class="stdbtn btn_black">打印标签</button></li>
                         <li><button class="stdbtn btn_orange" onClick="Bulkchanges()">批量修改</button></li>
                        <li><button class="stdbtn btn_red" onClick="changorderstatusPro('order_status',6)">标作废</button></li>
             <li><button class="stdbtn btn_blue" onClick="cancelOrderOversea()">海外仓撤单</button></li>
             <li><button class="stdbtn btn_blue" onClick="showSubmitOrderOversea()">海外仓导单</button></li>
             {{if $managers || in_array('215',$showpower)}}
             <li><button class="stdbtn btn_orange" onClick="toDisabledOrder()">预作废订单</button></li>
             {{/if}}
             <li><button class="stdbtn btn_blue" onClick="batchSearch()">批量查询</button></li>
                       <li> <label style="padding-left:5px;"><img src="/fuman/images/icons/orderweight.png" /> <a onClick="return chengprinttype('overweight','1');" style="cursor: pointer;" class="d_blue"><span>超重</span></a></label></li>
                       
                     <li> <label style="padding-left:5px;">  <img src="/fuman/images/icons/cross_circle.png" alt="" width="16" height="16" /> <a onClick="return chengprinttype('is_nodelivery','1');" style="cursor: pointer;" class="d_blue"><span>禁止发货</span></a></label></li>
                     <li> <label style="padding-left:5px;">   <img src="/fuman/images/icons/alertflag.png" />
<a onClick="return chengprinttype('is_que','1');" style="cursor: pointer;" class="d_blue"><span>缺货</span></a></label></li>
 <li> <label style="padding-left:5px;">   <img src="/fuman/images/icons/g_alertflag.png" />
<a onClick="return chengprinttype('is_que','2');" style="cursor: pointer;" class="d_blue"><span>不缺货</span></a></label></li>

<li> <label style="padding-left:5px;">   <img src="/fuman/images/list.png" />
<a onClick="return chengprinttype('orderproperty','1');" style="cursor: pointer;" class="d_blue"><span>可发货</span></a></label></li>

{{if $status==6 && ($userid==295)}}
	<li> <label style="padding-left:5px;">   <img src="/fuman/images/no.gif" />
<a onClick="return deleteorder();" style="cursor: pointer;" class="d_blue"><span>删除订单</span></a></label></li>
{{/if}}
                   </ul>
                </label>

           </div>
           
          {{if $managers || in_array('143',$showpower)}}
          <div style="padding:3px">
          <ul class="photosharing_menu">
            <li class="marginleft5 dropdown" id="actions">
                <a class="dropdown_label" href="#actions">
               {{if $ordersearchname}}{{$ordersearchname}}{{else}}订单搜索脚本{{/if}}
                <span class="arrow"></span>
                </a>
                <ul>
                
               {{foreach from=$ordersearch item=li key=key}}
                    <li><a href="javascript:void(0)" onClick="searchorder({{$li.id}})">{{$li.name}}</a></li>
                {{/foreach}}
                   
                </ul>
            </li>
        </ul>&nbsp;&nbsp;&nbsp;
        <button onClick="upsexpress('sfexpress')"  class="stdbtn btn_black">顺丰</button> 
         <button onClick="upsexpress('UPS')"  class="stdbtn btn_black">UPS</button> 
         <button onClick="upsexpress('DHL')"  class="stdbtn btn_black">DHL</button> 
         <button onClick="upsexpress('CNE')"  class="stdbtn btn_black">CNE</button> 
         <button onClick="upsexpress('UBI')"  class="stdbtn btn_black">UBI</button>
         <button onClick="emsexpress('YT')"  class="stdbtn btn_black">云途</button>
         <button onClick="emsexpress('YW')"  class="stdbtn btn_black">燕文</button>
         <button onClick="emsexpress('EMS')"  class="stdbtn btn_black">E邮宝线下苏州</button>
         <button onClick="upsexpress('WUY')"  class="stdbtn btn_black">无忧物流</button>
         <button onClick="emsexpress('CNPOST')" class="stdbtn btn_black">CNPOST</button>
         <button onClick="upsexpress('YIDA')" class="stdbtn btn_black">日本邮政</button>
         <button onClick="upsexpress('JIAC')" class="stdbtn btn_black">佳成物流</button>
	          <button onClick="emsexpress('OST')"  class="stdbtn btn_black">欧速通</button>
              <button onClick="upsexpress('ZTO')" class="stdbtn btn_black">中通快递</button>
         <button  class="stdbtn btn_black" id="outorderexcel" onClick="outOrderExcel();return false;">导出excel</button>
          </div>
         {{/if}}
        	</div>
         <div style="clear: both"></div>

       <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
   </div>
      
    <form class="stdform stdform2" method="get" id="search" action="/orderlist/orderlist">
   
   

      <div class="tableoptions"> 

        	
      <!--  <ul class="photosharing_menu">
            <li class="marginleft5 dropdown" id="actions">
                <a class="dropdown_label" href="#actions">
               {{if $ordersearchname}}{{$ordersearchname}}{{else}}订单搜索脚本{{/if}}
                <span class="arrow"></span>
                </a>
                <ul>
                
               {{foreach from=$ordersearch item=li key=key}}
                    <li><a href="javascript:void(0)" onClick="searchorder({{$li.id}})">{{$li.name}}</a></li>
                {{/foreach}}
                   
                </ul>
            </li>
        </ul>
               -->
		 <select name="platformID" id="platformID"  class="selection select2_group" style="width:100px;" onChange="getshopName()" >
        <option value="0" >平台</option>
        {{foreach from=$platform item=li key=key}}
              <option value="{{$li.id}}" {{if $platformID==$li.id}} selected{{/if}}>{{$li.name}}</option>
        {{/foreach}}
        </select>
        <select name="shopID" id="shopname"  class="selection select2_group" style="width:150px;" >
        <option value="" >店铺</option>
        {{foreach from=$d_shop item=li key=key}}
              <option value="{{$li.id}}" {{if $shopID==$li.id}} selected{{/if}}>{{$li.name}}</option>
        {{/foreach}}
        </select>
      
         <select name="st" id="st">
             <option value="">-订单属性-</option>
             <option value="正常订单" {{if $st=='正常订单'}} selected{{/if}}>正常订单</option>
             <option value="手工创建" {{if $st=='手工创建'}} selected{{/if}}>手工创建</option>
             <option value="补发订单" {{if $st=='补发订单'}} selected{{/if}}>补发订单</option>
             <option value="拆分订单" {{if $st=='拆分订单'}} selected{{/if}}>拆分订单</option>
              <option value="手工上传" {{if $st=='手工上传'}} selected{{/if}}>手工上传</option>
             <option value="未收到重发" {{if $st=='未收到重发'}} selected{{/if}}>未收到重发</option>
             <option value="已收到重发" {{if $st=='已收到重发'}} selected{{/if}}>已收到重发</option>
             <option value="部分退款" {{if $st=='部分退款'}} selected{{/if}}>部分退款</option>
             <option value="全额退款" {{if $st=='全额退款'}} selected{{/if}}>全额退款</option>
             <option value="退货订单" {{if $st=='退货订单'}} selected{{/if}}>退货订单</option>
             <option value="合并订单" {{if $st=='合并订单'}} selected{{/if}}>合并订单</option>
				  </select>
      </select>        
       <select name="status" id="status">
             <option value="">-状态-</option>
             <option value="1" {{if $status=='1'}} selected{{/if}}>新订单</option>
             <option value="2" {{if $status=='2'}} selected{{/if}}>已支付</option>
             <option value="3" {{if $status=='3'}} selected{{/if}}>配货中</option>
             <option value="4" {{if $status=='4'}} selected{{/if}}>已发货</option>
             <option value="5" {{if $status=='5'}} selected{{/if}}>已完成</option>
             <option value="6" {{if $status=='6'}} selected{{/if}}>作废</option>
             <option value="7" {{if $status=='7'}} selected{{/if}}>待审查</option>
		  </select>  
            <select name="expresstype">
            <option value="">-货运方式-</option>
            {{foreach from=$expresstype item=li key=key}}
           		 <option value="{{$li.name}}" {{if $expresstypeID==$li.name}} selected{{/if}}>{{$li.name}}</option>
            {{/foreach}}
			</select>
          <select name="shippingStatus">
              <option value="">-发货仓库-</option>
              <option value="9999" {{if $shippingStatus==9999}} selected{{/if}}>未分仓</option>
              {{foreach from=$warehouses item=li key=key}}
                <option value="{{$li.id}}" {{if $shippingStatus==$li.id}} selected{{/if}}>
                    {{$li.storagename}}
                </option>
              {{/foreach}}
          </select>
          <select name="ty" id="searchtype" class="selection" style="width:100px;" >
        <option value="1" {{if $ty==1}} selected{{/if}}>订单时间</option>
        <option value="2" {{if $ty==2}} selected{{/if}}>导入时间</option>
        <option value="3" {{if $ty==3}} selected{{/if}}>发货时间</option>
      </select>
    
       <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       <select name="filtertype">
					 <option value="">-查询条件-</option>
					 <option value="order_sn" {{if $filtertype=='order_sn'}} selected{{/if}}>订单编号</option>
					 <option value="tradeid" {{if $filtertype=='tradeid'}} selected{{/if}}>交易单号</option>
					<!-- <option value="sontradeid">子交易单号</option>
					 <option value="transactionid">transactionid</option>-->
					 <option value="productname" {{if $filtertype=='productname'}} selected{{/if}}>商品名称</option>
					 <option value="productid" {{if $filtertype=='productid'}} selected{{/if}}>商品编号</option>
					 <option value="customerid" {{if $filtertype=='customerid'}} selected{{/if}}>买家帐号(精确)</option>
					 <option value="custome" {{if $filtertype=='custome'}} selected{{/if}}>买家帐号</option>
					 <option value="consignee" {{if $filtertype=='consignee'}} selected{{/if}}>客户姓名</option>
					 <option value="email"  {{if $filtertype=='email'}} selected{{/if}}>客户Email</option>
					 <option value="tel" {{if $filtertype=='tel'}} selected{{/if}}>客户电话</option>
					 <option value="paypalmail" {{if $filtertype=='paypalmail'}} selected{{/if}}>Paypal ID</option>
					 <option value="shipping_number" {{if $filtertype=='shipping_number'}} selected{{/if}}>货运单号</option>
                   <!-- <option value="shipping_status" {{if $filtertype=='shipping_status'}} selected{{/if}}>发货仓库</option>-->
					 <option value="country" {{if $filtertype=='country'}} selected{{/if}}>国家(英)</option>
					 <option value="country_cn" {{if $filtertype=='country_cn'}} selected{{/if}}>国家(中)</option>
					 <option value="city"  {{if $filtertype=='city'}} selected{{/if}}>买家城市</option>
                     <option value="province"  {{if $filtertype=='province'}} selected{{/if}}>买家洲省</option>
					 <option value="zipcode"  {{if $filtertype=='zipcode'}} selected{{/if}}>邮政编码</option>
                      <option value="shopoper"  {{if $filtertype=='shopoper'}} selected{{/if}}>店铺负责人</option>
                  </select>:<input type="text" name="kw" id="kw" class="width200" value="{{$kw}}" placeholder="关键词" />
&nbsp;
        <button class="btn btn-primary" id="searchbtn">Search</button>
          
          <input type="hidden" name="outexcel" id="outexcel">
     	 <input type='hidden' name='if_csv' id='if_csv'>
    <input type='hidden' name='isow' id='isow'>
    <input type='hidden' name='isno' id='isno'>
    <input type='hidden' name='que' id='que'>
    <input type='hidden' name='orderby' id='orderby'>
    <input type='hidden' name='byt' id='byt'>
    <input type='hidden' name='isf' id='isf'>
      </div>
      
    
    </form>
    <!--搜索栏结束-->
     <div class="x_content" style="overflow-x:auto;">
<table cellpadding="0" cellspacing="0" border="0" class="stdtable" >
<thead>
  <tr class="lbbt">
    <td width="3%"  bgcolor="#FEFFF1"><a onClick="allSelect('ppid[]')">全选</a></td>
    <td width="10%" bgcolor="#FEFFF1">订单编号</td>
    <td width="5%" bgcolor="#FEFFF1">状态\属性</td>
    <td width="3%" bgcolor="#FEFFF1"><a href="javascript:void(0)" onClick="paixu('numday','{{if $orderbyst==''}}ASC{{else}}{{$orderbyst}}{{/if}}')">延迟</a><img src="/fuman/images/{{if $orderbyst=='DESC'}}arrowdown{{else}}arrowup{{/if}}.png"></td>
    <td width="10%"  bgcolor="#FEFFF1">店铺/客户/负责人</td>
    <td width="10%" bgcolor="#FEFFF1">原金额/订单金额/总价</td>
    <td width="7%" bgcolor="#FEFFF1">国家/国家(英)</td>
    <!--  <td bgcolor="#FEFFF1" style="width: 50px;">发货仓库</td>-->
    <td  bgcolor="#FEFFF1">发货仓库/货运方式/货运单号</td>
    <td  bgcolor="#FEFFF1" >订单日期/导入日期</td>
    <td  bgcolor="#FEFFF1" >运费/交易号</td>
	<td  bgcolor="#FEFFF1" >客户邮箱/Paypal邮箱</td>
    
  </tr>
</thead>
<tbody >

{{foreach from=$orderlist item=li key=key}}
  <tr onDblClick="showOrderlistSell({{$li.order_id}},'{{$li.order_sn}}','{{$li.tradeid}}')" title="双击显示商品信息" style="cursor:pointer">
    <td >
        <input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.order_sn}}" />
    </td>
    <td valign="middle" style="position:relative;">
     <a href="/orderlist/editorder?order_id={{$li.order_id}}" target="_blank"><font color="#6666FF">{{$li.order_sn}}</font></a>
     <br>
      {{if $li.is_nodelivery==0}}
      <img title="可发货" src="/fuman/images/icons/g_cross_circle.png" alt="" width="16" height="16">
      {{/if}}
      {{if $li.is_nodelivery==1}}
      <img title="禁止发货" src="/fuman/images/icons/cross_circle.png" alt="" width="16" height="16">
     {{/if}}
      {{if $li.is_que==1}} 
      <img title="缺货" src="/fuman/images/icons/alertflag.png" alt="">
      {{/if}}
      {{if $li.is_que==2}} 
      <img title="不缺货" src="/fuman/images/icons/g_alertflag.png" alt="">
      {{/if}}
   	{{if $li.is_overweight==1}}
    <img title="超重" src="/fuman/images/icons/orderweight.png" alt="">
    {{/if}}
   {{if $li.is_overweight==2}}
   <img title="不超重" src="/fuman/images/icons/g_orderweight.png" alt="">
   {{/if}}
   
   
    <img src="/fuman/images/icons/g_mail.png" title="无买家Message信息" border="0"> 
    
    
    {{if $li.platform_message}}
    <img  src="/fuman/images/icons/ebaynote.png" width="16" height="16" title="{{$li.platform_message}}"> 
    {{else}}
    <img title="无平台留言" src="/fuman/images/icons/g_ebaynote.png" alt=""> 
    {{/if}}

    {{if $li.remark}}
    <img src="/fuman/images/icons/content.png" title="{{$li.remark}}">
    {{else}}
    <img title="无备注" src="/fuman/images/icons/g_content.png" alt="">
    {{/if}}
    
     </td>
    <td valign="middle"><img src="/fuman/images/icons/flag_{{$li.order_status}}.gif">{{$li.statustext}}<br>{{$li.order_source}}</td>
     <td valign="middle">{{$li.numday}}天</td>
    <td style="position:relative;">
   
      <div style="margin-left:2px;">{{$li.shopname}} ({{$li.shopoper}})
     <br>{{$li.customerid}}
    </div>
     
      <div class="lbcp">
      </div>
   </td>
    <td valign="middle">{{$li.moneytype}} {{$li.goods_originask}}<br>RMB {{$li.goods_amount}}<br>RMB {{$li.goods_total}} </td>
    <td valign="middle">{{$li.country}}<br>{{$li.country_cn}}</td>
      <!--
      <td valign="middle">
          {{if $li.shipping_status==0}}
          未分仓
          {{/if}}
          {{if $li.shipping_status==1}}
          英华英国仓
          {{/if}}
          {{if $li.shipping_status==2}}
          英华德国仓
          {{/if}}
          {{if $li.shipping_status==3}}
          EZGO美国仓
          {{/if}}
                    {{if $li.shipping_status==4}}
          万邑通美西仓
          {{/if}}
      </td>-->
    <td class="cz">
        {{if $li.shipping_status==0}}
        未分仓
        {{/if}}
        {{if $li.shipping_status==1}}
        英华英国仓
        {{/if}}
        {{if $li.shipping_status==2}}
        英华德国仓
        {{/if}}
        {{if $li.shipping_status==3}}
        EZGO美国仓
        {{/if}}
        {{if $li.shipping_status==4}}
        万邑通美西仓
        {{/if}}
        {{if $li.shipping_status==5}}
        一号仓
        {{/if}}
       <!-- <br/>{{$li.postageservice}}-->
        <br>{{$li.shipping_name}}<br>{{$li.shipping_number}}
    </td>
    <td class="cz">{{$li.ordertime}}<br>{{$li.add_time}}</td>
   	<td class="cz">{{if $li.shipping_fee=='0.00'}}{{else}}<font color="#FF0000">{{$li.shipping_fee}}</font>{{/if}}<br>{{$li.tradeid}}</td>
    	<td class="cz">{{$li.email}}<br>{{$li.paypalmail}}</td>
  </tr>
{{/foreach}}
</tbody>

</table>
</div>
  <div class="page">{{$showmemorygetusage}}{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
</div>
</div>
 <form class="stdform stdform2" method="get" id="Newsearch" action="/orderlist/orderlist">
    <input type='hidden' name='ordersearchID' id='ordersearchID' value="{{$ordersearchID}}">
 </form>
  
  <!-- 模态框（Modal）显示订单商品信息 -->
  <form  method="post">
  <div class="modal fade" id="showorder" tabindex="-1" role="dialog" aria-labelledby="sshoworder" aria-hidden="true">
    <div class="modal-dialog" style="width:50%;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sshoworderSN">   </h4>
        </div>
        <div class="modal-body">
         <table cellpadding="0" cellspacing="0" border="0" class="stdtable" >
          <tr class="lbbt"><td width="15%" bgcolor="#FEFFF1">商品编号</td><td bgcolor="#FEFFF1" width="30%">商品名称</td><td bgcolor="#FEFFF1">数量</td><td bgcolor="#FEFFF1">价格</td><td bgcolor="#FEFFF1">成本</td><td bgcolor="#FEFFF1">总价</td><td bgcolor="#FEFFF1" width="18%">库存/仓库/仓位</td></tr>
          <tbody id="showorderlistdata"></tbody>
          </table>
          <div class="modal-footer">
           <button type="button" class="btn btn-default" onClick="showordersellsubtotal()"> 小计 </button>
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
  
  </form>
  
  

  
  <!-- 模态框（Modal）交运内容 -->
<form action="/order/ajaxbutton?op=saveexpress"  method="post" name="attributeform" id="attributeform" target="_blank">
<input type="hidden" name="type" id="type">
  <div class="modal fade" id="expressform" tabindex="-1" role="dialog" aria-labelledby="sexpressform" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sprintform">待交运订单编号</h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" id="shipment_order_table">
            <tr>
              <td width="100">订单号： </td>
              <td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
            </tr>
          	<tr style="display:none" id="cnetype_tr">
            <td>发货方式</td>
            <td><select name="cnetype" id="cnetype">
                <option value="RM平邮直航(GBP)">RM平邮直航(GBP)</option>
                <option value="CNE全球特惠">CNE全球特惠</option>
                <option value="CNE全球快捷">CNE全球快捷</option>
                <option value="AT挂号小包">AT挂号小包</option>
                
                <option value="CNE全球通平邮">CNE全球通平邮</option>
                <option value="全球特惠(EUR)">全球特惠(EUR)</option>
                <option value="CNE全球通挂号">CNE全球通挂号</option>
                <option value="CNE全球专项">CNE全球专项</option>
                <option value="CNE全球经济">CNE全球经济</option>
                </select></td>
            </tr>

            <tr style="display:none" id="jiactype_tr">
            <td>发货方式</td>
            <td>
            <select name="jiactype" id="jiactype">
                <option value="德国佳成物流">德国佳成物流</option>
                <option value="法国佳成物流">法国佳成物流</option>
                <option value="英国佳成物流">英国佳成物流</option>
                <option value="澳洲佳成物流">澳洲佳成物流</option>
                <option value="西班牙佳成物流">西班牙佳成物流</option>
            </select>
            </td>
            </tr>
            <tbody style="display:none" id="wuytype_tr">
    		<tr >
            <td>配送方式</td>
            <td><select name="pickstyle">
                <option value="0" selected>上门揽收</option>
                <option value="1">自行配送</option>
             </select></td>
			</tr>
            <tr >
            <td> 国内快递</td>
            <td>  <select name="kd">
                <option value="">-请选择-</option>
                   <option value="505">顺丰速运</option>
                   <option value="2">EMS</option>
                   <option value="102">韵达快递</option>
                   <option value="500" selected>中通快递</option>
                   <option value="-1">其他</option>
                   <option value="504">天天快递</option>
                   <option value="1216">全峰快递</option>
                   <option value="1152">中铁物流</option>
                   <option value="101">圆通速递</option>
                   <option value="100">申通快递</option>
             </select>
			</td>
			</tr>
             <tr >
            <td> 快递单号</td>
            <td>  <input class="small_input" type="text" style="width:30mm;" name="kdnumber" id="kdnumber">
			</td>
			</tr>
             <tr >
            <td> 线上发货物流</td>
            <td>  <select name="Expressqudao" style="width:200px;">
                               <option value="">-请选择-</option>
                                  <option value="CAINIAO_STANDARD_TS_1710315" selected>江苏省苏州市昆山市花桥镇	花集路668号宝湾物流1号库1号门 </option>
                            </select>
			</td>
			</tr>
              <tr >
            <td> 是否含电池</td>
            <td>   <select name="isbattery">
                <option value="0" selected>无电池</option>
                <option value="1">有电池</option>
             </select>

			</td>
			</tr>
               <tr >
            <td> 不可达处理</td>
            <td><select name="UndeliverableDecision">
             	<option value="-1">未选择</option>
                <option value="0" selected>退回</option>
                <option value="1">销毁</option>
             </select>

			</td>
			</tr>
            </tbody>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-primary"  onclick="onstsubmit()"> 提交 </button>
            <button type="button" class="btn btn-default" 
               data-dismiss="modal" style="display:none"> 关闭 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
 </form>
  <!-- /.modal -->
<!-- 云途 燕文 ems等交运方式-->
    <!-- 模态框（Modal）交运内容 -->
    <form action="/deliverorder/ajaxbutton?op=saveexpress"  method="post" name="yanwenattributeform" id="yanwenattributeform" target="_blank">
        <input type="hidden" name="yanwentype" id="yanwentype">
        <div class="modal fade" id="yanwenexpressform" tabindex="-1" role="dialog" aria-labelledby="sexpressform" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sprintform"> <span id="order_mailno">待交运订单编号</span>  </h4>
                    </div>
                    <div class="modal-body">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="100">订单号： </td>
                                <td align="left"><textarea name="yanwenorderlist" id="yanwenorderlistst" cols="10" rows="10"></textarea></td>
                            </tr>
                            <tr id="logistics_tr">
                                <td>物流方式： </td>
                                <td align="left">
                                    <select name="logistics" id="logistics" onChange="changeLogistics()">
                                    </select>
                                </td>
                            </tr>
                            <tr id="account_tr">
                                <td>账号： </td>
                                <td align="left">
                                    <select name="account" id="account">
                                    </select>
                                </td>
                            </tr>
                            <tr>
                              <td>发货方式： </td>
                              <td align="left">
                                  <select name="deliver" id="deliver">
                                    <!--  <option value="燕文美国专线">燕文美国专线</option> -->
                                      <option value="中邮上海挂号小包">中邮上海挂号小包</option>
                                      <option value="中邮上海平邮小包">中邮上海平邮小包</option>
                                      <option value="新加坡邮政挂号小包">新加坡邮政挂号小包)</option>
                                  </select>
                              </td>
                            </tr>
                        </table>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal" style="display:none"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="onyanwensubmit()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
    </form>
    <!-- /.modal -->

    <!-- 海外仓导单-->
    <!-- 模态框（Modal）交运内容 -->
    <form action="/orderexcel/ajaxbutton?op=doSubmitOrderOversea"  method="post" name="overseaattributeform" id="overseaattributeform" target="_blank">
        <input type="hidden" name="overseatype" id="overseatype">
        <div class="modal fade" id="overseaexpressform" tabindex="-1" role="dialog" aria-labelledby="sexpressform" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title"><span id="order_mailno">海外仓导单订单编号</span></h4>
                    </div>
                    <div class="modal-body">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="100">订单号： </td>
                                <td align="left"><textarea name="overseaorderlist" id="overseaorderlistst" cols="10" rows="10"></textarea></td>
                            </tr>
                            <tr>
                                <td>发货仓库： </td>
                                <td align="left">
                                    <select name="deliveroversea" id="deliveroversea" onChange="changeWarehouse()">
                                        <option value="">请选择</option>
                                        <option value="1">英华英国仓</option>
                                        <option value="2">英华德国仓</option>
                                        <option value="3">EZGO美国仓</option>
                                        <option value="4">万邑通美西仓</option>
                                        <option value="5">一号仓发货</option>
                                        <option value="6">EZGO美国仓(仅更新仓库)</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>货运方式： </td>
                                <td align="left">
                                    <select name="transportoversea" id="transportoversea">
                                        <option value="">请选择</option>
                                        <option value="UPS-G-I">美国 UPS Ground</option>
                                        <option value="DHLPEU">德国 DHL Paket</option>
                                        <option value="DPDEU">德国 DPD Domestic Package</option>
                                        <option value="DPORD">德国 DP Large Letter</option>
                                        <option value="YH2TK">英国 Royal Mail 2nd Class TR48</option>
                                    </select>
                                </td>
                            </tr>
                        </table>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal" style="display:none"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="submitOrderOversea()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
    </form>
    <!-- /.modal -->

    <!-- 导单订单EXCEL-->
    <!-- 模态框（Modal）交运内容 -->
    <form action="/orderexcel/ajaxbutton?op=importExcelOrder" enctype="multipart/form-data" method="post" name="excelattributeform" id="excelattributeform" target="_blank">
        <div class="modal fade" id="excelorderform" tabindex="-1" role="dialog" aria-labelledby="sexpressform" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title"><span id="order_mailno">订单导入</span></h4>
                    </div>
                    <div class="modal-body">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="100">导入Excel表： </td>
                                <td align="left">
                                    <input  type="file" name="file_excel" />
                                </td>
                            </tr>
                            <tr>
                                <td width="100">请选择平台： </td>
                                <td align="left">
                                    <select name="platformId" id="platformId" onChange="showShopNames()">
                                        <option value="">-请选择平台-</option>
                                        <!-- 平台id    5 淘宝  6 天猫  2 亚马逊  21 日本雅虎  22 台湾shopee -->
                                        {{foreach from=$platform item=li key=key}}
                                            {{if $li.id eq 2 || $li.id eq 5 || $li.id eq 6 || $li.id eq 21 || $li.id eq 22 || $li.id eq 10}}
                                                <option value="{{$li.id}}">
                                                    {{$li.name}}
                                                </option>
                                            {{/if}}
                                        {{/foreach}}
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td width="100">请选择店铺： </td>
                                <td align="left">
                                    <select name="shopId" id="shopId">
                                        <option value="">-请选择店铺-</option>
                                        <!--
                                        {{foreach from=$shops item=li key=key}}
                                        <option value="{{$li.id}}">
                                            {{$li.name}}
                                        </option>
                                        {{/foreach}}
                                        -->
                                    </select>
                                </td>
                            </tr>
                            <!--
                            <tr>
                                <td width="100">或输入店铺名： </td>
                                <td align="left">
                                    <input  type="text" name="shopName" value="" style="width: 120px;" placeholder="请输入店铺名"/>
                                </td>
                            </tr>
                            -->
                            <tr>
                                <td width="100"><span style="color:red;font-size:16px;">支持平台：</span> </td>
                                <td align="left">
                                    <span style="color:red;font-size:16px;">&nbsp;&nbsp;亚马逊、淘宝、天猫、日本雅虎、台湾Shopee、速卖通</span>
                                </td>
                            </tr>
                            <tr>
                                <td width="100">平台excel模板:</td>
                                <td align="left">
                                    <a href="/fuman/importExcelTemplates/amazon_template.xls" target="_blank">亚马逊平台excel模板</a> &nbsp;
                                    <a href="/fuman/importExcelTemplates/taobao_template.xls" target="_blank">淘宝天猫excel模板</a> &nbsp;
                                    <a href="/fuman/importExcelTemplates/yahoo_template.xls" target="_blank">日本雅虎excel模板</a> &nbsp;
                                    <a href="/fuman/importExcelTemplates/taiwan_template.xls" target="_blank">台湾平台excel模板</a> &nbsp;
                                    <a href="/fuman/importExcelTemplates/aliexpress_template.xls" target="_blank">速卖通平台excel模板</a> &nbsp;
                                </td>
                            </tr>
                            <!--
                            <tr>
                                <td width="100" colspan="2">
                                    <span style="color:red;">备注：若输入店铺名，则以该店铺名为准导入相关订单信息</span>
                                </td>
                            </tr>
                            -->
                        </table>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal" style="display:none"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="doImportExcel()">导入</button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
    </form>
    <!-- /.modal -->
    
<form action="/Expressshipment/disableOrder"  method="post" name="DisabledOrderform" id="DisabledOrderform">
    <input type="hidden" name="trade_id_str" id="trade_id_str">
    <div class="modal fade" id="DisabledOrderDiv" tabindex="-1" role="dialog" aria-labelledby="sexpressform" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">× </button>
                    <h4 class="modal-title"><span id="order_mailno">请输入需要作废的订单交易号</span></h4>
                </div>
                <div class="modal-body">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="100" align="right">订单交易号： </td>
                            <td align="left"><textarea name="trade_numbers" id="trade_numbers" cols="10" rows="10"></textarea></td>
                        </tr>
                        <tr>
                          <td align="right">注意： </td>
                          <td align="left" style="color:#999">一行一个交易号</td>
                        </tr>
                    </table>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default"
                                data-dismiss="modal" style="display:none"> 关闭 </button>
                        <button type="button" class="btn btn-primary"  onclick="executeDisabledOrder()">确定提交</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
    </div>
</form>
    <!-- 批量查询-->
    <!-- 模态框（Modal）交运内容 -->
    <form action="/orderlist/orderlist"  method="post" name="batchsearchattributeform" id="batchsearchattributeform" target="_blank">
        <div class="modal fade" id="batchsearchexpressform" tabindex="-1" role="dialog" aria-labelledby="sexpressform" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title"><span id="order_mailno">批量查询订单编号或运单号或交易号</span></h4>
                        
                    </div>
                    <div class="modal-body">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="100">订单号或运单号或交易号： </td>
                                <td align="left"><textarea name="batchsearch" id="batchsearch" cols="10" rows="10"></textarea></td>
                            </tr>
                             <tr>
                                <td width="100">类型： </td>
                                <td align="left"><select name="istype">
                                	<option value="1">普通订单</option>
                                    <option value="2">工厂定制单</option>
                                	</select></td>
                            </tr>
                            <tr>
                                <td colspan="2" style="color:red;">备注：每行一个订单号或运单号或交易号</td>
                            </tr>
                        </table>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal" style="display:none"> 关闭 </button>
                            <input type="hidden" id="flagtype" name="flagtype" value="">
                            <button type="button" class="btn btn-primary"  onclick="submitOrderBatch(2)">导出excel</button>
                            <button type="button" class="btn btn-primary"  onclick="submitOrderBatch(1)">查询</button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
    </form>
    <!-- /.modal -->
<div id="goToTop" style="display:none"><a href="javascript:;">TOP</a></div>
</body>
</html>